Fix bugs with set up on Solaris