Effects of Mg substitution on crystal structure and hydrogenation properties of Pr1−xMgxNi3