Make compatible with Symfony >=2.1, <3.0