Set threads to 1 if HAVE_THREADS is defined