forward-compatibility polyfill for PHP 5.5's DateTimeImmutable class.