Browserify fix

When used with browserify, library produces next error:
`Uncaught TypeError: Cannot read property 'document' of undefined ` on line 23, where we try to evaluate `view.document`.
This code change seems to help. 
Good enough or is there another fix for this? Not sure,  whether `this.window` had to be removed.