Use libstdthreads

Index: meson.build
--- meson.build.orig
+++ meson.build
@@ -129,7 +129,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',
@@ -229,7 +229,8 @@ common = static_library(
   'macros.h',
   'xmalloc.c', 'xmalloc.h',
   'xsnprintf.c', 'xsnprintf.h',
-  dependencies: [utf8proc]
+  dependencies: [utf8proc],
+  dependencies: [stdthreads]
 )
 
 misc = static_library(
@@ -239,6 +240,7 @@ misc = static_library(
   'misc.c', 'misc.h',
   'uri.c', 'uri.h',
   dependencies: [utf8proc],
+  dependencies: [stdthreads],
   link_with: [common]
 )
 
@@ -282,7 +284,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
@@ -315,7 +317,7 @@ executable(
   'user-notification.c', 'user-notification.h',
   'wayland.c', 'wayland.h', 'shm-formats.h',
   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)
