An algorithm for solving the indefinite least squares problem with equality constraints