* gnu/packages/algebra.scm (pthread-variant): New procedure. (fftw-with-threads, fftwf-with-threads): Use it.