Add compatibility with <PHP5.5