Add optional ctypes dependency