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