StringIO#set_encoding should set the encoding to default external when passed nil