fix non-portable use of sed's -i option

The makefile makes use of sed's -i (in-place) option, with an empty backup suffix. Unfortunately, GNU sed and BSD sed (as used on MacOSX) have incompatible syntax in this case:

BSD:  sed -i '' ...
GNU: sed -i ...

Fortunately, they are compatible when you specify a suffix for the backup copy of the file:

both: sed -i.old ...
This PR creates a patch that should be upstreamed but can be used as an interim measure.