Fix for #3596: Make fftconvolve threadsafe