Ground state solutions for the nonlinear Klein-Gordon-Maxwell equations