Add a compat stdatomic.h implementation based on GCC atomics