Fix mixpanel initialization

Mixpanel API uses an intermediate object also called mixpanel before it's really initialized. This pull request contains logic to ensure waitForVendorApi returns the correct object.