[testMain] Find the pid of init for that running in a user session mode.

Ubuntu 13.10 runs 'init' as a user session mode when X11 is used.
In that case, the pid of the user mode 'init' is not 1.