Is there only one kernelversion for AIX5?  It kind of seems like this needs to be more general?

Maybe cast it to an int and check if it's 5000 <= x <= 6000?  Assuming that the kernel versions are numbered the way that I am guessing from this code.