polyfill check_output for python 2.6