On the polynomial differential systems having polynomial first integrals