Changes to compile with mingw in Windows

Don't forget to call WSAStartup() in your main program to initialize
Winsock. See test/main.c on how to do it.

Use Makefile.mingw to build with mingw.