work around bug in older boost

should do a better fix later with reversing stream direction