Adds support for start and end offsets to buffer.toString. Fixes #448.