fixes for Windows cross-compile