Fix PHP backward compatibility for version <5.2.1