Fix Javascript error when SONATA_CONFIG is undefined

Not sure if it is really an issue or a misconfiguration of mine, but `window.SONATA_CONFIG` is undefined, causing a Javascript error when accessing `CONFIRM_EXIT` property. 

In all cases, I think it is a good idea to make a test here, to avoid undesirable side effects.