Fix compatibility with Symfony2.0

Test for existence of 2.1 specific method before calling it.