--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ PKG_CHECK_MODULES(zlib, zlib)
 # optional
 PKG_CHECK_MODULES(openssl, openssl >= $OPENSSL_VERSION, have_openssl=yes, have_openssl=no)
 
-GLOBAL_CFLAGS="-Wno-multichar -O2"
+GLOBAL_CFLAGS="-Wno-multichar -O2 "
 AC_LDADD=""
 AC_LDFLAGS=""
 AC_MSG_CHECKING([whether we need platform-specific build settings])
diff --git a/src/Makefile.am b/src/Makefile.am
index ace33d4..4e3c9ad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,7 +17,7 @@ AM_LDFLAGS = \
 	$(libzip_LIBS) \
 	$(zlib_LIBS) \
 	$(openssl_LIBS) \
-	$(libcurl_LIBS)
+	$(libcurl_LIBS) -lws2_32
 
 AM_LDADD = $(AC_LDADD)
 
