Fixed warning in cmake 3.0 and above.

If I understand correctly, the COMPILE_DEFINITIONS_DEBUG property is ignored in newer versions of cmake. I fixed it by forcing to use old method.