Synthesis and physical properties of uranium thin-film hydrides UH2 and UH3