added UMD support thanks to @quarterto