Switch to a memory stream implementation that isn't limited to int.MaxValue bytes