use libdl if present (needed on ubuntu linux)
small change