in the middle of replacing mongoose
fixes for win32
More win32 fixes