Workaround for window tests in IE 8