PHP < 5.5.0 compatibility without DateTimeImmutable