mingw: fix build with autotools

/cc @piscisaureus