Fix Py2.7 build errors