I suggest either "-Wl,--rpath=/usr/local/lib" (untested) or to check
if /usr/local/lib is listed in /etc/ld.so.conf, running ldconfig after
modifying it. Please be sure to understand the result of modifications.
You can check the actually used library using "ldd exim".