To make it possible for apps to find out whether they are running in public mode, the flag "isPublic" will now be present in the DOM. Backport of 6a36d7fa required by other fixes.