Fix compilation issues for Windows