Use getmypid() if POSIX function isn't available

POSIX functions aren't available on Windows.

http://www.php.net/manual/en/intro.posix.php