revert sed use to ed use in building nlopt case