Fix compatability with Pimple 5.3 and Composer version of Silex

Changes to fix compatibility with Pimple 5.3 and latest composer version of Silex Framework.

Additionally, thanks writing this library, I've adapted it to work with the latest Silex and would like to push it back to the master branch to help others.