N-dimensional zero-hopf bifurcation of polynomial differential systems via averaging theory of second order