Fixed some compilation problems on Windows.