Python 2.6 fix, adding backported captureWarnings for #18