rename cmake WITH_THREADS to WITH_THREAD_SAFETY