Fix mouse scrolling on Ubuntu

This fixes pull request #12 and Trac #237.