Build fixes for SunOS.
Add Linux support.