Making pagePosition test work in IE8