Fixes for win32 compiling.