Rescuing quartic and natural inflation in the Palatini formalism