John McGinn scored Scotland's first World Cup goal for 28 years to ensure a winning start in Group C.