Replaced win32 function with cross platform string copy