Here is a patch:

```diff
diff --git a/src/string_bytes.cc b/src/string_bytes.cc
index 543664e..9116653 100644
--- a/src/string_bytes.cc
+++ b/src/string_bytes.cc
@@ -221,7 +221,7 @@ static inline size_t hex_decode(char* buf,
 }
 
 
-bool GetExternalParts(Handle<Value> val, char** data, size_t* len) {
+bool GetExternalParts(Handle<Value> val, const char** data, size_t* len) {
   if (Buffer::HasInstance(val)) {
     *data = Buffer::Data(val);
     *len = Buffer::Length(val);
@@ -234,14 +234,14 @@ bool GetExternalParts(Handle<Value> val, char** data, size_t* len) {
   if (str->IsExternalAscii()) {
     const String::ExternalAsciiStringResource* ext;
     ext = str->GetExternalAsciiStringResource();
-    *data = const_cast<char*>(ext->data());
+    *data = ext->data();
     *len = ext->length();
     return true;
 
   } else if (str->IsExternal()) {
     const String::ExternalStringResource* ext;
     ext = str->GetExternalStringResource();
-    *data = reinterpret_cast<char*>(const_cast<uint16_t*>(ext->data()));
+    *data = reinterpret_cast<const char*>(ext->data());
     *len = ext->length();
     return true;
   }
@@ -256,7 +256,7 @@ size_t StringBytes::Write(char* buf,
                           enum encoding encoding,
                           int* chars_written) {
   HandleScope scope(node_isolate);
-  char* data;
+  const char* data;
   size_t len = 0;
   bool is_extern = GetExternalParts(val, &data, &len);
 
```