build: fixed check for pthread_create()