Fix ActiveRecord 4.0.