Spectral Numerical Mode Matching Method for Metasurfaces