Mixed and penalty formulations for finite element analysis of an eigenvalue problem in electromagnetism