fix over-zealous detection of libatomic (it was picked up at configure
time if present at all, rather than only if needed)

Index: meson.build
--- meson.build.orig
+++ meson.build
@@ -348,7 +348,19 @@ if features['libdl']
 endif
 
 # C11 atomics are mandatory but linking to the library is not always required.
-dependencies += cc.find_library('atomic', required: false)
+if cc.links('''
+#include <stdint.h>
+int main(void) {
+  uint32_t x32 = 0;
+  uint64_t x64 = 0;
+  __atomic_load_n(&x32, __ATOMIC_SEQ_CST);
+  __atomic_load_n(&x64, __ATOMIC_SEQ_CST);
+  return 0;
+}''', name : 'built-in atomics')
+    stdatomic_dep = dependency('', required : false)
+else
+    stdatomic_dep = cc.find_library('atomic')
+endif
 
 cplugins = get_option('cplugins').require(
     win32 or (features['libdl'] and cc.has_link_argument('-rdynamic')),
