Use a helper function to check the availability of promise. JerryScript-DCO-1.0-Signed-off-by: Tamas Keri [email protected]