FreeBSD-support

BSD doesn't link to libdl (integrated in libc).
Also prefers clang over gcc