agent: More fix for get_client_pid for portability.