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 too.