Initialize HAVETHREADS (was accidently removed in previous commit).