autotools: Check for pthread library in system
Added headers in Makefile.am to include them in make dist tarball