Python 3 fixes

These changes were already mentioned in https://github.com/celery/py-amqp/issues/46
It should work with Python 3 now