Finished PHP 5.3 compatibility

Slow but sure