Fixing tests in PHP 5.4