Use CMAKE_DL_LIBS instead of dl