Fix detection of Rails::Engine for Rails 4

There was code saying if defined?(Rails::Engine), but that didn't work on our Rails 4 project.
It seems to work better as defined(::Rails::Engine).
Merge pull request #45 from tjgrathwell/colon-colon-rails-engine

Fix detection of Rails::Engine for Rails 4