cmake: fixed incorrect usage of add_definitions() on Linux

We should not add definition CVAPI_EXPORTS for tests/performance tests on Linux (non-MSVC).
Problem is:
- add_definitions() adds defines for all targets created in the current cmake directory (module, tests, perf tests).