One more patch to fix the preprocessor conditions, this time to fix --disable-threads builds. Tested x86_64-linux, committed to trunk.