Make it Windows compatible.

Change `posix_getpid()` function to allow Windows compatibility.