Use ldconfig to find library paths rather than libdl (#39).