Add linking flags -ldl when compiling with threadpool debugging on.
This is required according to the man pages: https://man7.org/linux/man-pages/man3/dladdr.3.html
It fixes an issue @yvesrevaz reported.
Not sure why it has always worked for us without it.