Fixed compilation errors on Windows