Respect default encoding if present.

IO#readpartial assumes it is dealing with binary data and always returns
ASCII-8BIT. However, Ruby environments that have Encoding.default_internal set
will attempt to encode() strings to that encoding when performing the
operations listed here:

http://ruby-doc.org/core-1.9.3/Encoding.html#method-c-default_internal