add AC_CHECK_LIB for pthread

addresses videlalvaro/mypeb#1