Further refinement of Mac OS X scrolling; thanks to Marc Culler for an additional patch.