Triangular bases of integral closures