Make sure THREADS is set no matter which threading model is selected.