Update libterm/termtest to work on Mac