Support commonjs, amd and global definitions.