fix detection of kernel naming conventions