Making it work on solaris