support amd and commonjs with build process