MAPREDUCE-4374. Fix child task environment variable config and add support for Windows. Contributed by Chuan Liu.