string::arrayBufferToOctets: fix phantomjs