Replace use of obsolete variable `last-command-char`

The variable was an alias of `last-command-event` but has been removed in Emacs 24.3.