comms/asterisk: fix build on SmartOS

fix build on SmartOS.

##### channels/chan_oss.c:

fix include of <code>sys/soundcard.h</code> on sunos

##### main/Makefile:

<code>--version-script</code> and <code>--warn-common</code> are only supported by GNU ld.
Added a check to only use it then.

##### main/utils.c:

patch unused variable error