cmd/ld: when linking externally, only generate dwarf info for ELF

R=golang-dev, iant
CC=golang-dev
https://codereview.appspot.com/9025047