[NAN] Fix assumption about Strings containing single-byte characters.

Code assumed that each character was represented by a single byte.

Change-Id: I92ea63f7273379ed1035f10c207d41e3e352bf38
(cherry picked from commit 9a6161c61cb99460afa2c575f39c046391fa1c97)
3 files changed