fix terminal size detection in mintty

cc @vtjnash this look good to you?