Fixed some compilation problems on Solaris.

Closes issue #1047.
Automatically run passenger-install-apache2-module and passenger-install-nginx-module in `--auto` mode if stdin is not a TTY.

Fixes issue #1030.