Fix getting position of scroll in IE

Based on http://stackoverflow.com/a/14384091