Yet another patch for building on windows