Added AMD/CommonJS support.