Representations of surface groups in real symplectic groups