More PHP v5.3 compatibility fixes

Fixes #32