Use pageYOffset instead of scrollY

This should fix issue #7.