Variable elimination in post-translational modification reaction networks with mass-action kinetics