Support older versions of ActiveRecord
Be more leniant about other gem versions