When the dynamic ASan tests are linked on FreeBSD, -pthread must be
added to the link flags (so that libthr.so is put in the NEEDED section
of the executable), otherwise the initial call to pthread_key_create()
in AsanTSDInit() will return ENOSYS, and ASan will fail to initialize.
I'm not completely sure if this is the correct way to add the flag, but
it worked for me...