core/keybindings: Fix the mousewheel stuff on emacs24/tty

On the TTY, we do not have mouse-wheel events, not even under emacs24,
so make it conditional on the existence of the function.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>