Fix sed call to be compatible with non-GNU sed