Fixes scrolling with a mouse wheel in Firefox if jquery-mousewheel is used

Issue #1982