wrap in UMD so it works in node, AMD, and browser globals environment.