Fix building with MinGW