don't use -ldl on BSDs
silence warnings with Solaris Studio compiler