Use sed instead of Bash for string replacement.

Hopefully this fixes Travis build fails.