changes to work under MAMP PHP 5.5