Use window if 'this' is not defined

Signed-off-by: Ryan Chen <ryan.chen@turn.com>
Merge pull request #159 from turn/personal/rchen/fix-this-object

Use window if 'this' is not defined when using browserify 'require' function