fix lexical cast problem on solaris