Fixed test failures in PHP 5.4.