support PHP < 5.4