A regularization approach for the analysis of rhessi X-ray spectra