fixed msvc/win32 build errors