... and export LD_LIBRARY_PATH properly. This is a follow-up from 2d4c2152. Fixes #2586 Reported-by: Bernhard Walle