Fix build with newer mingw versions