Patch for doctrine to work in PHP 5.6

Many thanks to @remicollet for the patch :)