Fix is_hdf5 for Python 3.x