Support newer doctrine

This should work with newer Doctrine versions. I'm using Symfony 2.6 which comes with a more recent Doctrine.