added add_definitions(-DCVAPI_EXPORTS) to cmakelists.txt

propsed bugfix for  Bug #3059 and #3170