Patch needed for platforms without atomic CAS.