refactor generator script for python3
backport FindExpat,FindIconv from Player
Merge pull request #41 from take-cheeze/python3

refactor generator script for python3