make ActiveRecord detection work on Ruby 2.0.x