fix up for old php versions