Fix initialisation on rails 4

Derived from https://github.com/emberjs/ember-rails/blob/5f24e71c73b727ab6c05f12cf574606bdf8b6629/lib/ember/rails/engine.rb