[PATCH 1/2] configure: Detect pthread support using -pthread instead of -lpthread.