Register sprockets engine in config.before_initialize.
This fixes template compilation on Rails 4.0.0.rc1.