Fix compilation when building without the Video I/O module.
Merge pull request #3446 from pokeefe:fix-compilation-without-videoio