Fix break under ActiveRecord version < 4.0