fix build.py so it works with python3