Fixed compilation issues on Windows