hid.pyx: fix convert to bytes on write() function in Python3.