use a better way to determine if environment is node.js
use a better way to determine if environment is node.js

because module and module.exports can be in the browser with browserify. but window is less likely to be in a node.js environment.

nkcmr/modlog