Generation of magnetic fields by the ponderomotive force of electromagnetic waves in dense plasmas