meson: check pthread_setname_np like autotools

FreeBSD < 12.2 and OpenBSD only have pthread_set_name_np.
As libpthread isn't in scope use -Werror to trip the check.

Header <pthread.h> has symbol "PTHREAD_MUTEX_RECURSIVE" : YES
Checking if "pthread_setname_np(tid, name)" compiles: YES

os/inputthread.c:326:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    pthread_setname_np (pthread_self(), "InputThread");
    ^
os/inputthread.c:447:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    pthread_setname_np (pthread_self(), "MainThread");
    ^

Fixes: c20e7b5e ("meson: Automatically detect HAVE_PTHREAD_SETNAME_NP")
4 jobs for meson-freebsd11-setname in 7 minutes and 39 seconds (queued for 1 second)
Status Job ID Name Coverage
  Docker Image
passed debian-buster #8712983

00:02:20

 
  Build And Test
passed autotools #8712984

00:05:18

passed meson #8712985

00:03:03

passed meson-noglamor #8712986

00:01:15