make commonjs api work with non-global `module`, expose amd api