Check kernel version automatically