Extension of Ambarzumyan's Theorem to General Boundary Conditions