Fix compilation errors on non-Windows platforms