Fix compile errors on win32