Modified Gouy phase in optical resonators with mixed boundary conditions, via the Born-Oppenheimer method.