PYTHON-346 - Fix DBRef encoding under jython2.7

Jython doesn't support struct.pack_into for bytearray.