Added compatibility with PHP 5.2
Merge pull request #2 from Czocher/master

Added compatibility with PHP 5.2