Replacing gcc intrinsics with OSAtomic* on Apple devices.