Fix MSVC build warnings and improve assertion in cv::determinant