Cherry-pick: Only use <atomic> for C++11 and newer

See bionic 3ce0769aa5f9a991af1d167f730d987dd002253c
BUG=17736764

Change-Id: If63b6c8394f8574fd198fd24dfc42a3aaba865d5
Merge "Cherry-pick: Only use <atomic> for C++11 and newer"