Work around lack of __sync_fetch_and_nand in clang

clang chose to not implement this function. See
http://llvm.org/bugs/show_bug.cgi?id=8842