--- configure.orig	2016-03-06 20:24:37 UTC
+++ configure
@@ -19348,7 +19348,7 @@ $as_echo_n "checking µTP... " >&6; }
 build_utp="no"
 
 ac_save_LIBS="$LIBS"
-LIBS="-lutp"
+LIBS="-lutp $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <libutp/utp.h>
@@ -19423,7 +19423,7 @@ $as_echo "$build_utp" >&6; }
 
 
 ac_save_LIBS="$LIBS"
-LIBS="-lminiupnpc"
+LIBS="-lminiupnpc $LIBS"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking system miniupnpc library" >&5
 $as_echo_n "checking system miniupnpc library... " >&6; }
 
