Fix joyent/node#8683

This PR fixed the encoding issue of converting external string into Buffer (#8683).
`} else if (is_extern) {`