Clean up Python 2.x workarounds