Add fallback to os.gettpid() when psutil is not available