Fix #709.  Works around Python < 2.6.5 not handling unicode keyword arguments.  Also works around BytesIO.read not taking a long int.