Fix a few compile errors on Windows