iOS before Mac-os in class definition

iPad etc also have mac in their UserAgent, putting iOS before mac in class-generation makes sure right os is selected.