Make unittests run under OS X

Simpler than expected:
* some missing includes
* GetParentPID() uses `/proc` which of course is not available in OS X