diff --git a/lddd b/lddd
index 1bd69a8f6d5d816a723cbe28699d3523e6747890..de2145cccae96f55027344ef8201415c40e99fee 100755
--- a/lddd
+++ b/lddd
@@ -4,9 +4,9 @@
 #
 
 ifs=$IFS
-IFS=':'
+IFS="${IFS}:"
 
-libdirs='/lib:/usr/lib:/opt/qt/lib:/opt/kde/lib:/usr/lib/libfakeroot:/opt/NX/lib'
+libdirs="/lib /usr/lib $(cat /etc/ld.so.conf.d/*)"
 extras=
 
 TEMPDIR=$(mktemp -d /tmp/lddd-script.XXXX)