Some fixes to mac version

1) It had been broken by the conversion of generateGuid() to
Guid::newGuid() so that is now fixed.

2) Properly clean up CFUUIDRef after extracting bytes.