Fix errors in usages of try_compile:

* There's no OPENCV_BINARY_DIR variable;
* Output variables are unused;
* Wrong usage of CMAKE_FLAGS;
* Small quoting and style issues.