Add support of commonjs + amd and global