Fix php5.2 compatability