Update to support Caspian 5.1.0 and PHP 5.4
merge