Removed dead code.
Use the atomic API since it's available in all supported versions.