Fix for Rails 4.1 environments. That check, while valid in Ruby 2.1.1 returns an incorrect value when run under Rails 4.1.