work with kernels > 3.5

There's an api change that requires a thurd variable.