#2768: fix compatibility problem with newer version of mingw