A Hilbert space for the classical electromagnetic field