Do not use OS-specific sed features

This restores compatibility with both GNU sed and BSD sed on all
operating systems. Fixes #273