Make compatible with Symfony >2.4