Move matrix_inverse_mod to Matrix.inv_mod.