Extension of the Anderson-Newns model for hydrogen chemisorption on Ni(100), Ni(111) and W(110)