Sort the environment properly

The Rack environment has mixed String and Symbol keys. These cannot be compared, therefore you get the error reported in josevalim/rails-footnotes#77.