I'm not sure how DjVuLibre can fail to accept PDF as an input, since as far as I know it is a Ghostscript device. Do you have some documentation that says this can't be done ? If so, I would complain to the maintainers, I can't see any reason for this.
Since this works with file output, the logical answer is that there is some newline translation going on.
Some quick googling reveals that there is a lot of discussion about this, but I can't see anything which precisely matches your experience. You should probably tag this for MingW or more sensibly take it to a MingW support forum.
Or just stop piping the I/O around.