added support for cygwin under windows

As the topic explains, I have added support to find the phantom pid when running cygwin under windows.

For some reason git thinks the whole file has been changed, but infact it's only line 94-121 that has been slightly modified.