Fix compatibility to numpy without rfftfreq.

Fixes #599.