fix initialize_on_precompile for Rails 4