Detect MSYS host and add windows libraries during configure
Summary
Windows builds require a specific library for socket polling. The configure.ac checked for mingw
did not catch an msys
host environment, which leads to link-time errors with WSAPoll. This fixes those errors.