ENH: Allow flags in str.replace keywords

Fix what appears to be an oversight.