Fix some windows build errors & warnings that I merged in earlier.