Fix detected flags from ACX_PTHREAD being reset.

For that matter, you could avoid repetition by using a case statement:
```
case "x$with_pthreads" in
    x|xyes|xno) ;;
    *) LIBS=...; CFLAGS=...;;
esac
```