Make the library compatible with Symfony >= 2.3

This PR should allow to use the library with all Symfony versions >= 2.3