Allow installation on systems without GNU sed

GNU sed's -i option is a non-standard extension. Instead, use output redirection
to achieve our goal.