Fix mousewheel event browser-compatibility issues

The extend function should probably be moved to a different module