Ensure compatibility with Grape 0.8.0, 0.9.0 and 0.9.1.

This supersedes https://github.com/tim-vandecasteele/grape-swagger/pull/166, thanks @osbornebrook for giving me a head start on this.