Tighten up the Rails feature detection to deal with Rails 2 apps that have Sprockets installed as seperate middleware.
Merge pull request #2631 from polleverywhere/master

Rails 2 compatability