Variables go first, the extensions need them. Also set up IE legacy support variables.