Cross-platform sed