Efficient numerical method for solving the direct Zakharov-Shabat scattering problem