plan9port: make it actually work

* Add "which" dependency, otherwise it builds with lots of "command not found" errors.
* -lgcc_s, otherwise many commands basically fail without pthread_cancel.
* Fix X11 dependencies, otherwise it would be plan9port with none of UI programs working.
The default builder runs this script with `set -e; set -o pipefail` anyway, so it's unnecessary (and probably confusing to casual readers) to duplicate that setting here.