Fixed njs_buffer_set() introduced in 27bb9caf186c.

Previously an instance of Uint8Array was returned, not Buffer.
diff --git a/src/njs_buffer.c b/src/njs_buffer.c
index 27232c4..5544259 100644
--- a/src/njs_buffer.c
+++ b/src/njs_buffer.c
@@ -97,7 +97,7 @@
 
     buffer = (njs_array_buffer_t *) &array[1];
 
-    proto = &vm->prototypes[NJS_OBJ_TYPE_BUFFER].object;
+    proto = &vm->prototypes[NJS_OBJ_TYPE_ARRAY_BUFFER].object;
 
     njs_lvlhsh_init(&buffer->object.hash);
     njs_lvlhsh_init(&buffer->object.shared_hash);
@@ -111,10 +111,12 @@
     buffer->u.data = (void *) start;
     buffer->size = size;
 
+    proto = &vm->prototypes[NJS_OBJ_TYPE_BUFFER].object;
+
     array->type = NJS_OBJ_TYPE_UINT8_ARRAY;
     njs_lvlhsh_init(&array->object.hash);
     njs_lvlhsh_init(&array->object.shared_hash);
-    array->object.__proto__ = &vm->prototypes[array->type].object;
+    array->object.__proto__ = proto;
     array->object.slots = NULL;
     array->object.type = NJS_TYPED_ARRAY;
     array->object.shared = 0;
diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c
index 3ba4ddc..c683814 100644
--- a/src/test/njs_unit_test.c
+++ b/src/test/njs_unit_test.c
@@ -19656,8 +19656,11 @@
               "var s = (new TextDecoder()).decode(u16); [s, s.length]"),
       njs_str("ЙИЗЖЁЕДГВБА,11") },
 
-    { njs_str("$r.buffer.sort().slice(0,3)"),
+    { njs_str("new Uint8Array($r.buffer.sort().slice(0,3))"),
       njs_str("129,144,145") },
+
+    { njs_str("$r.buffer instanceof Buffer"),
+      njs_str("true") },
 };
 
 static njs_unit_test_t  njs_shared_test[] =