Fix calculating scrollTop in some browsers