inet_* functions on Windows

Unfortunately, these headers are "interesting" on Windows. They
absolutely have to be included prior to <windows.h> which is included
from other system headers (nu surprise there). In some earlier version
of this patch this was not a problem, but I suspect that our
config.h-ification for the `LIBYANG_API_{DEF,DECL}` made stuff more
complex :(.

TL;DR: make sure that our "compat.h" goes in first, otherwise Bad
Things™ happen.
diff --git a/compat/compat.h.in b/compat/compat.h.in
index df9449b..0f99765 100644
--- a/compat/compat.h.in
+++ b/compat/compat.h.in
@@ -15,6 +15,12 @@
 #ifndef _COMPAT_H_
 #define _COMPAT_H_
 
+#ifdef _WIN32
+/* headers are broken on Windows, which means that some of them simply *have* to come first */
+# include <winsock2.h>
+# include <ws2tcpip.h>
+#endif
+
 #include <limits.h>
 #include <pthread.h>
 #include <stdarg.h>