Changes to support PHP previous to 5.4