Re-factor the API to sit behind a feature detection switch