Updated Promise to use correct global object in Browser and Node