Backport of Rails 3.1.x Sprockets integration to Rails 3.0.x