Fix kind compare on 64 bit systems