core: fix freeze/crash in gnutls (bug #41576)

The link is now made against pthread on all platforms.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>