An L2-quotient algorithm for finitely presented groups