fixes for opencv <3.0.0