Add support of amd + commonjs and global