Fix compatibilities with older php versions