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/CMakeLists.txt b/CMakeLists.txt
index ea4b625..0443057 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -367,7 +367,7 @@
     include_directories(${COMPAT_POSIX_INCLUDES})
 
     find_package(pthreads REQUIRED)
-    set(COMPAT_WIN_LIBRARIES PThreads4W::PThreads4W shlwapi.lib)
+    set(COMPAT_WIN_LIBRARIES PThreads4W::PThreads4W shlwapi.lib ws2_32)
     target_link_libraries(yang ${COMPAT_WIN_LIBRARIES})
 endif()