Backport DictWriter.writeheader from current Python into 2.6