change the on_load init callback to support Rails 4.1.0.rc