Don't check for window undefined

Checking for window undefined means this module can't be used with browserify