Compatibility patch for python 3.3+

`__qualname__` attr was introduced in python 3.3:
https://docs.python.org/3.3/library/stdtypes.html#class.__qualname__
and it has broken type checks. This small patch fixes it.