fix out-of-tree build and new kernel support