Wait until getModal returns the correct value

In response to https://github.com/t4t5/sweetalert/issues/53

the function is split to two swal and modalDependant

check getmodal if it returns null or not, if it does return null then
start an interval with 100ms until it does not return null and then call
the modalDependant() function, previously swal