Fix -pthread link time warnings on OS X by upgrading to current ax_pthread.m4
and applying change suggested at http://savannah.gnu.org/patch/?8186#comment7