core: Fix support of posix-lock for FreeBSD.
* src/posix-lock.c [__FreeBSD__] (use_pthread_p): Use pthread_key_create to determine if it's linked to lpthread or not.
This is from glthread_in_use in gnulib/lib/glthread/threadlib.c.
On FreeBSD, pthread_key_create in there in libc (stub function) as
well as -lpthread (real one), while pthread_create is not available
in libc.
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>