Fixes #5090: Possible to register js as shimmed AMD module
Merge pull request #5150 from ewinslow/amd-shim-b5090

Fixes #5090: Possible to register js as shimmed AMD module