2D finite-element electromagnetic code to find the TE/TM eigenvalues of an arbitrary cross-section