Beam quality M2 factor matrix for non-circular symmetric laser beams