Add support for building on FreeBSD to Makefile

dlopen, dlsym and friends are built into libc on FreeBSD
and libdl is Linux specific.

libexecinfo is used to provide backtrace functions in
place of GNU libc.