Fixed to build with opencv 3.x and MSVC.