Start using atomic counters and set a CMake policy to the new (2.6) type.