Fix php < 5.5 compatibility