Workaround for IronPython's bytearray interface