McGregor undergoes surgery, vows to return to octagon