fix incorrect LD_LIBRARY_PATH obtained after loading modules