Coverting DateTime to string fails in PHP 5.4