Add and update .gitignores.
[php] Support PNG output without GD.
[python] Enable build with PNG output without GD.