added add_definitions(-DCVAPI_EXPORTS) to cmakelists.txt

proposed bugfix for  Bug #3059 and #3170