Minor fixes

Fix failed builds that opencv's buildbot has got.