Refactor remnants of pecan.compat with alternatives from the six package.