Fix a php5.3 incompatibility and a PSR issue