Conditionally hack mw.Api

Follow up to I4c92422428de60d2e11ba891fe44dbf43ad99c43
Since some of our code runs on desktop let's play it safe!

Change-Id: Ib67349c9ae7aa2a6720df9a92d2e1fc40a5462a8
Merge "Conditionally hack mw.Api"