Fix tidy_bytes for JRuby
The previous implementation was broken because JRuby (1.7.10) doesn't
have a code converter for UTF-8 to UTF8-MAC.
Merge pull request #13919 from jcoyne/fix_jruby_encoding

Fix tidy_bytes for JRuby