open_memstream and fseek don't mix - pull out optimization

This was disappointing to find out.