Germany beat Ukraine 2-1 for first win in four games