The ribosome modulates folding inside the ribosomal exit tunnel