Some changes to make kernel compile on gcc 4.7