Make router compatible with Symfony 2.4+