Zonal flow generation by parametric instability in magnetized plasmas and geostrophic fluids