Stabilization of spectral methods for the analysis of singular systems using piecewise constant basis functions