Fixed error when running tests in PHP5.3