Adapt to latest Ctypes