Improve pidof detection