Fixes for solaris compiler