added old pthread once code to platform.h
this change makes the commits in DFCommon.h doubtful at best.
Test cases are at same level as when this patch was orignally committed.