Moved imports out of get_terminal_size()