lib/common: check return value of dlsym() and not dlerror()
dlsym() on FreeBSD can set dlerror() even though it sucessfully returns
the address of the function. Without this change pacemaker will fail
with the following error:
Undefined symbol "_nss_cache_cycle_prevention_function"