Add helper getDefaultView for IE8

This is an IE8 only workaround that is used in two places, lets put it in a helper instead so it's easier to spot when we stop supporting IE8. Or perhaps we should explicitly comment in both places that `parentWindow` is a fallback for IE8.