Fixed compile errors for OpenCV V2.X