install-php: On OS X, install the homebrew-php dependencies first.

Also make sure Homebrew's up to date.