require Global.app to be set before creating a GlobalID

fix #5

I'm not sure if it's a good idea to reset GlobalID.app like this way. But I didn't find a better way by now.