Fix -pthread link time warnings on OS X by upgrading to current ax_pthre...

...ad.m4 and applying change suggested at http://savannah.gnu.org/patch/?8186#comment7

It fixes the issue on current OS X (and doesn't break anything on current Ubuntu).