Fix deadlock on termbox.Close().