Mcrypt on WHM/cPanel
To enable mcrypt support in WHM you need to use the EasyApache module.
It’s available in the Software section:

Click the gear icon in the Actions column and configure the profile that was used for the last build:

Basically on every screen you can just click Next Step, if you don’t need any changes besides mcrypt.
On the Short Options List page (which relates to php) you need to select Exhaustive Options List.
Using the Ctrl+F key combination find mcrypt and check the box next to it.

The Save and Build button is at the bottom of the page.
Other modules are added the same way. Keep in mind that apache will get recompiled in the process, which may affect site availability.