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

call getModal to see if it returns null or not, if it does return null then
start an interval with 100ms and check if it returns null until it does not return null and then call
the modalDependant() function, previously swal