Fix compilation issues on Windows