Ab initio sudden transition state theory for the F + H2 and F + D2 reactions