Add missing iostream includes

Three packages no longer compile due to missing includes of "iostream".  This trivial pull request adds these missing includes, as well as other missing includes of system headers in those four files that were being modified anyway.
Please merge as soon as convenient.