Allow installation on systems without GNU sed

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