Fix Python 3 support

Signed-off-by: Jerome Flesch <jflesch@gmail.com>