Make mass replacing work on OS X