Tweaked method used to find window to grab _NET_WM_PID from.