Make app/generator/generate.php more portable

The former way the php executable was searched just in /opt/local/bin.

Now, it is searching all user's environment for that.

Source: http://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html