#31: Fixed compatibility with PHP 5.1