patches for using activerecord 3.2/ruby1.9.3