SendData.c: fix headers/defines for MinGW

io.h is only needed under MSVC (for close()), otherwise use unistd.h
MSG_WAITALL isn't defined in winsock2.h under MinGW