Backport ERB::Util.url_encode for Tiger

This is used in the patch code.