Revert "Revert "Add type cast definitions for CPDF_Reference.""