Change some version checks to use ActiveRecord.

This allow using ActiveRecord fixtures without pulling in all of Rails.