fixed build so that it now compiles on apple platforms again - code was using strcpy_s which is MS only