Port to C++11 atomics.