Allow running within node-webkit

Node webkit gives our module access to a window object, even though we still run in a node environment. Therefore we should check, if we can access process and not if we can access window.

(I hope, I did this right, first pull-request I have ever opened)