Support TIOCGWINSZ ioctl.

Other parts of gecko use this, but I don't think it's contributing to #876.  Using that as an excuse to fix it though.