Build the CDS library separately and fix build options for cygwin port