add AC_CHECK_LIB for pthread

addresses videlalvaro/mypeb#1
change list_entry to zend_rsrc_list_entry

to fix the issue with compiling against php 5.4 per videlalvaro/mypeb#3
Merge pull request #2 from unix1/master

fix configure and make issues against php 5.4