Added <algorithm> includes for VS 2013.

See http://review.source.kitware.com/#/c/13199/
Fixed ostream compile error on VS 2013.

See http://stackoverflow.com/a/23155893
VS 2013 updates.

Signed-off-by: John M. Drescher <drescherjm@gmail.com>