Fix kernel compilation errors on AMD system