Move prototype_legacy_helper from plugin to gem to support Rails 4.0+