Fix #1222, StringIO.gets w/ utf8

https://github.com/jruby/jruby/issues/1222