default settings fallback for alert.js

when adding alert boxes dynamically, the settings option on the alert-box is empty and throws an error when trying to close the alert-box.

this change allows to fall back to default settings, which otherwise are not accessible
Merge pull request #3841 from stryju/patch-3

[bug] default settings fallback for dynamically added alert-boxes