Fix missing monkey-patch in Rails 3.1