Attempt Ruby 1.8.7 compatibility
Use more explicit ActiveRecord::VERSION::MAJOR