[addon runmode] Fixed resolveMode in runmode.node

This fix has been modelled after the getMode function in runmode.node in
v3.20.0