The quantum spin Hall effect is a fundamental property of light