Move compatibility hack to extension