meson: Check if -latomic is needed to link

Should fix #411
8 jobs for !591 with check_libatomic_needed in 5 minutes and 34 seconds (queued for 2 seconds)
latest merge request