strace it.
It appears to be using libltdl to wrap dlopen(), so it's probably passing a stupid hardcoded path or something inane like that. libtool is the worst.
EDIT:
https://www.gnu.org/software/libtool...interface.html
Seems to hint that it only relies on the environment when *NOT* fed a canonical path.