Existence of periodic orbits for vector fields via Fuller index and the averaging method