The F + H2 and Cl + H2 potential energy surfaces at long range, including open-shell and spin-orbit effects