Measuring the entanglement of coupled spins by multiphoton interference