A closed-form solution for a crack approaching an interface