Corrected an issue with disabling the V2 API support in cmake-based builds.