Replaced find_library with CMAKE_DL_LIBS.