Fixed issue #58 (PHP-5.2 compatibility)