Remove debugging printf left in strndup function.
Revert change to saidar includes to fix build.
Fix build when threads are disabled.