using module.exports code path before trying to use define
Merge branch 'reorder-umd-header' into gh-pages