fix for _ctypes compilation on device