add support for the rat in xterm-compatible terminals

Signed-off-by: Mattias Andrée <maandree@operamail.com>