Update libterm/termtest to handle window resizing