Fix typos causing --disable-threads to fail to work sometimes and the "thread" package to not be included when --enable-threads is passed sometimes