Measurement of the CP-violating phase φs in B-s0→J/ψπ+π- decays