Check for pthread_yields existence before trying to use it.