Adds a work-around for OpenCVs HighGUI not being multithreading safe.

Signed-off-by: Mathias Garbe <mail@mathias-garbe.de>