use v8 readbuffer function, and if not, assert on read() returning an array as we expect