Support for Caspian 5.1 and PHP 5.4