Bifurcations of invariant manifolds of differential equations and normal forms in neighborhoods of elliptic curves