Fix AMD/RequireJS support