Fix support for Rails 2 in helpers