main/Makefile: Fix build failure on SmartOS/Illumos/SunOS

This patch fixes two issues when building on SmartOS:

- channels/chan_oss.c: it makes sure soundcard.h is found
- main/Makefile: only use "-Wl,--version-script" when GNU LD is used as the Sun
  Linker doesn't support that. Similar checks are already used elswhere in the
  Makefile

Review: https://reviewboard.asterisk.org/r/3426

ASTERISK-23576 #close
Reported by: Sebastian Wiedenroth
patches:
  fix-sunos.diff uploaded by Sebastian Wiedenroth (License 6597)
........

Merged revisions 412468 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/12@412483 f38db490-d61c-443f-a65b-d21fe96a405b