fix compilation on linux
add copying strings when converting from NPAPI