kern_procctl.c: use td->td_proc instead of curproc
(cherry picked from commit 3692877a6cf8fc374349f3d9b2cbb190fec484a0)