[1] Link with c++.lib now that it builds

- Move #include <pthread.h> inside the !def no-threads guard
- Fix test support include for Windows