Handling 'window is not defined' in Node.js - Fixes #257
Node-compatibility, adding document check
Merge pull request #258 from ElliotChong/0.3.8

Handling 'window is not defined' in Node.js - Fixes #257