Incorporate pull request rails/jquery-ujs#377

See rails/jquery-ujs#377 for full discussion; this fixes handling of form inputs when the `form` attribute instead of a `<form>` element is used.