[WIP] Make the library compatible with Symfony >= 2.4

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