Added work-around for missing `strndup()` on Windows with MS runtime.