Fix various compile errors on Windows.