Periodic solutions of polynomial non-autonomous differential equations