Diagonalizing matrices over AW*-algebras