Remove unused macros, copyright heartbeat
tests: run on freebsd
Fix compiling on OpenBSD

OpenBSD, unlike FreeBSD and NetBSD, does not require -lcrypt. Issue a
warning only if libcrypt is not found.

On platforms that do not support crypt_r, do not require linking with
pthreads.