Makefile/configure: detect and use sed from configure