Outer approximation algorithm for nondifferentiable optimization problems