Use gnu sed when available

(OSX sed is stupid)