The US Defence Secretary is facing criticism for his apparent online mocking of members of Canada's cadet programme.