some fixes from ojk/ja
Remove usage of USE_CD_KEY (and fix build by removing an unnecessary and unclosed bracket.
Fix warnings in CMakeLists.txt
Fix warning about HAVE_STDLIB_H redefinition