Detection of H+, H2+, and H3+ with silicon barrier detectors operating in the dc mode