Restore rails-ujs.js UMD module support
#28617

javan wants to merge javan:rails-ujs/fix-npm-package into rails:master

We do not currently have an analysis of these two commits