r: use stable prefix for gettext and readline

Use opt_prefix and similar for gettext and readline paths so that R doesn't break when the supporting libraries are updated.