Improve compatibility with PHP 5.3

Signed-off-by: crynobone <crynobone@gmail.com>