Stability of atomic and diatomic hydrogen in fcc palladium