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.
Sorry for seeing this late. I think stub is a good idea though these code works. What do you think about stub? @jeremy