Add some hacks to make it run on 2.6.32

Hi - I backported your code to 2.6.32 (sadly some people still run this). Feel free to take this if useful.