Patch tests to work in PHP 5.2