Quantum key distribution with untrusted detectors