Quantum key distribution with a heralded single photon source