Correct autoconf for FFTW
Add autoconf check for pthread