Fix string handling of ccall and cwrap when argument strings contain non-ASCII characters

Fixes https://github.com/kripken/emscripten/issues/2752.