cmake: Avoid target_compile_definitions.

So that it can be build with cmake 2.8.10.