Call curl write function properly so that XML larger than 16K no longer
segfaults