PHP 5.3 compatibility fixes
Merge pull request #2 from michaelmoussa/master

PHP 5.3 compatibility fixes