r10438: Move portability functions to lib/replace/; replace now simply ensures