window object for commonjs enviroments in IE8

In commonjs environments this refers to an empty object and not the window object. IE8 fails with an error.