Here's an idea: designate the EMA's location in Canary Wharf as sovereign EU territory (just as if it were an embassy) and then it could remain in London yet still be located in the EU...