Fix atomic for gcc in RefMap.