return charPtr intead of CString to work around https://github.com/rbranson/node-ffi/issues/111