fix sed no -r option on mac