Fix ax_pthread.m4 on Darwin (Fixes #29)

So apparently clang supports (or will tollerate) '-pthread' when invoked as a
compiler on Darwin, but will spit out an error if -Werror is set and the flag
is passed when it is called as a linker.

While the version of ax_pthread.m4 I am kind of deals with this, according to
the autoconf archive bugtracker, more is needed.  Apply the changes from Brian
Aker from the discussion there that people claim will fix this.

https://savannah.gnu.org/patch/?8186