configure: fix build issue when building under MSYS2