Fixed race condition in the omp profiler.