configure: check that pthreads is compatible with compiler.

In particular the mutex initialization for example won't actually
compile with e.g. gcc 2.95.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
