Modified byte_buffer::ptr to treat constness correctly.