Termsize fix for windows

Thx for your fix for termsize.

I just fixed a small problem for cross compiling to Windows from linux.

For future help i also added a test script to check cross compiling.