Fix PHP building when GD is disabled. Closes #4550
Merge branch 'branch-6-2' of github.com:mapserver/mapserver into branch-6-2