Numerical computation of solitary waves in a two-layer fluid