PHP 5.2 backport

I don't see any reasons to use LSB here; looks like
the only thing that prevents from using PHP 5.2
Merge pull request #2 from 4d47/php52

PHP 5.2 backport