A simple mechanism underlying the effect of protecting osmolytes on protein folding