fix g++ warning about lexical cast