fixed mac osx opencv compile problems