Applied Peter Meiser's patch to make it build on newer kernels