added get-ppid function for OS X.