return handles

addOnWindowUnload and addOnUnload should return a handle so we can
disconnect the event if needed