On the canonical form of the electromagnetic field