configure: fix previous commit

This doesn't help if -pthread is omitted. (Apparently, glibc 2.17, on
which I tested the previous commit, doesn't require -lpthread in order
to use pthreads either.)