cmd/ld: only pass -rdynamic to host linker on ELF target
cmd/ld: only pass -rdynamic to host linker on ELF target

Fixes issue 5150.

R=golang-dev, franciscossouza
CC=golang-dev
https://codereview.appspot.com/8120043

firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang,wesolows/golang-old,wesolows/golang-old,wesolows/golang,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang,wesolows/golang,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang