Fix sed call for gnu and osx