try fix c_long / c_ulong cast for 32bit linux.