Fix compile errors for win32