wrap as universal module for Node, AMD, or browser global

(pattern from https://github.com/umdjs/umd)