Use C++11 atomic instead of OSAtomic