Work around a bug in libc++'s basic_istream::ignore().
Work around an obscure bug of the unpickler on Mac OS.

This work around prevents the boot unpickler to be used with
arbitrary streams. Only file streams are supported. So this is
not a good fix on the long run.

Eventually, we should figure out what the real issue was, and
revert this commit with a proper fix.