Add initializeCGOptions function.