Fix sed call to work on macOS
See https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux. The current invocation does not work on macOS:
sed: 1: "config.h": command c expects \ followed by text
This MR changes the sed call to work across macOS and Linux.