Wrap inm_is_ifp_detached() declaration and definition with #ifdef KTR
to avoid unused function error from clang.