Fixes for win32 cross platform compiling