IE8 compatability fix for missing window.pageYOffset

Small change to get things working in IE8 where window.pageYOffset is not a thing.