Fix: remove dependency on sed

sed was used to rewrite cpp output

Now done by applying a regular expression replace in native JS.