Provide compatibility check_output for 2.6 (Fixes #2926)