Add support for PHP versions before 5.3.0