Do not blindly add libdl to extra libraries

On some systems dlopen() is available without libdl (illumos, solaris).
Sometimes libdl.so cannot be loaded by runtime linker, see
https://ghc.haskell.org/trac/ghc/ticket/8713