ZN Berry phase and symmetry-protected topological phases of the SU( N ) antiferromagnetic Heisenberg chain