Make sure String#byteslice doesn't explode

When running under Ruby 1.8 `String#byteslice` will throw an exception due to the `encoding` method not existing. This patch resolves that, although doesn't have any tests because I couldn't see where to implement them - I'm quite happy to add some if you can point me in the right direction.