Fix compilation when --without-threads is given #3683

Reviewer: Georg Brandl, Benjamin Peterson
2 files changed