This patch enables building of the asan, lsan, profile and ubsan parts of sanitizer on FreeBSD.
I'm not sure if we should commit this patch first or last. In the latter case and before the patch is committed, it can work as a reference for those who would like to try to build the sources on FreeBSD.