libfdt: fix build with Python 3