Restructure atomic_*_z() so that no casting within macros is necessary. This avoids warnings when compiling with clang.