Handle ruby 1.8, which doesn't have String#force_encoding