added CommonJs, AMD support