How to install `mcrypt` for PHP 7.2?

pecl install mcrypt-snapshot

serverpilot.io/community/articles/how-to-install-the-php-mcrypt-extension.html

In Windows, I use the phpseclib/mcrypt_compat shim:

composer require phpseclib/mcrypt_compat:*

How to add phpseclib/mcrypt_compat to Magento 1 (for PHP 7.2)?