fix static library and executable building.