Fix compile problems on Windows