diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -146,11 +146,11 @@
 
     # Modify the libs if necessary for systems with only -mt boost libs    
     if not os.path.exists(
-        os.path.join(sysconfig.PREFIX, "lib", "libboost_filesystem.so")):
+        os.path.join(sysconfig.get_config_var("LIBDIR"), "libboost_filesystem.so")):
         # It's likely that this system doesn't have symlinks setup
         # So add '-mt' to the libraries
         for lib in _libraries:
-            if lib[:6] == "boost_":
+            if lib[:6] == "boost_" and lib[-3:] != "-mt":
                 _libraries[_libraries.index(lib)] = lib + "-mt"
 
 _sources = glob.glob("./libtorrent/src/*.cpp") + \
