Add support for Rails 4.0 while maintaining Rails 3.2 backwards compat