Decode byte string result when using Python 3

Fixes issue #1843