Port _webp.c to Python 3