A Numerical Method for Optimization of Structures with Repeated Eigenvalues