A heat capacity estimator for Fourier path integral simulations