Gamma-ray emission in proton-induced nuclear reactions on natC and Mylar targets over the incident energy range of $E_p$ = 30-200 MeV. Astrophysical implications