Fix ENABLE_THREADS