Fix error with clang

We can't pass a direct pointer to the print function.
Also check for dlfcn.h