Calculation of reaction and fusion cross sections using angle-dependent phase shifts