Catch AttributeError on str.decode - Python 3.x support.