Use libstdthreads

Index: meson.build
--- meson.build.orig
+++ meson.build
@@ -135,7 +135,7 @@ if cc.has_argument('-fmacro-prefix-map=/foo=')
 endif
 
 math = cc.find_library('m')
-threads = [dependency('threads'), cc.find_library('stdthreads', required: false)]
+stdthreads = dependency('stdthreads')
 libepoll = dependency('epoll-shim', required: false)
 pixman = dependency('pixman-1')
 wayland_protocols = dependency('wayland-protocols', version: '>=1.41',
@@ -239,7 +239,8 @@ common = static_library(
   'macros.h',
   'xmalloc.c', 'xmalloc.h',
   'xsnprintf.c', 'xsnprintf.h',
-  dependencies: [utf8proc]
+  dependencies: [utf8proc],
+  dependencies: [stdthreads]
 )
 
 misc = static_library(
@@ -249,6 +250,7 @@ misc = static_library(
   'misc.c', 'misc.h',
   'uri.c', 'uri.h',
   dependencies: [utf8proc],
+  dependencies: [stdthreads],
   link_with: [common]
 )
 
@@ -293,7 +295,7 @@ if get_option('b_pgo') == 'generate'
     'pgo',
     'pgo/pgo.c',
     wl_proto_src + wl_proto_headers,
-    dependencies: [math, threads, libepoll, pixman, wayland_client, xkb, utf8proc, fcft, tllist],
+    dependencies: [math, stdthreads, libepoll, pixman, wayland_client, xkb, utf8proc, fcft, tllist],
     link_with: pgolib,
   )
 endif
@@ -327,7 +329,7 @@ executable(
   'wayland.c', 'wayland.h', 'shm-formats.h',
   'xkbcommon-vmod.h',
   srgb_funcs, wl_proto_src + wl_proto_headers, version,
-  dependencies: [math, threads, libepoll, pixman, wayland_client, wayland_cursor, xkb, fontconfig, utf8proc,
+  dependencies: [math, stdthreads, libepoll, pixman, wayland_client, wayland_cursor, xkb, fontconfig, utf8proc,
                  tllist, fcft],
   link_with: pgolib,
   install: true)
