php5.4 compatibility adjustments