A finite element approach to the computation of the MHD spectrum of straight noncircular plasma equilibria