make pid_of work with processes owned by other users, same method used as in 'ps'