Removed optim dependence

Removed optim dependence and added explicit depence from highgui in module's CMakeLists file