Use getpid instead of GetCurrentProcessId as the latter calls into io-la...

...yer which is not initialzed at this point.