add full AMD support using UMD's returnExportsGlobal. fixes #448