allow cms::thread_guard to be used on variables too