Duplicate strings from environment hash to avoid issues with calls into ...

...native code