cmake: do not link with dl in case of *SAN
cmake: removed unneeded BSD bits
XXX