fix($parse): make the window check in ensureSafeObject IE8 friendly