fix python3-incompatible reference to basestring