Fixed deprecation warning that occurs in Rails 4.0

We noticed a Rails 4.0 deprecation warning when running our specs and traced it back to the static_dispatcher in apipie-rails. Have a look if you conceptually agree with my fix and merge at your leisure. It should be compatible with previous versions of Rails and all the tests pass.