Add compatibility with Symfony2.3