Fix Solaris warnings/errors