Added support to find dlopen in either libdl or libdld since some platforms package it there.