replace gnu-sed with system sed

and put post install conditional