Fix crash in setup.py on Python 3

TypeError: expected an object with the buffer interface