Get dcap to compile on macosx.
Add fork safety.

Imported dcap-2.47.5.0-fork-safety.patch from CMSDIST.
Merge pull request #4 from cms-externals/cms/2.47.8

Patches used in production by CMS