Fix some lingering build failures caused by fixing implicit inclusion of
if_var.h. Also explicitly include lock.h and mutex.h in if_kr.c rather than
depending on if_var.h to bring them in.