Entangling remote qubits using the single-photon protocol