Fixed compilation problems on Windows