Fix for older versions of Rails.