Add window to scope if not run in node mode