document unload promise resolving correctly with promise shim