fixup atomic ops for gcc 4.6 and earlier