Don't build thread library for targets that don't support threads.