Polynomial first integrals for the Chen and Lu systems