Use adaptive mutexes for condition variables, if available.