Fix build for platforms which use python3 by default
Fix member shadowing warnings