(Themaister backport) Add FFT implementation