Added OS X compatibility for SED