0.9/unipackage support

wanted to use this in my Cordova project, so whipped up the necessary changes to package.js :smiley_cat: 
Hi @raix,

I guess that's your coding standard, and I'd be happy to comply, but in many many years of JS I learned the opposite :-) truth-testing something that might not be defined is not (in my experience) safe. And && is never more readable than an if! Expressing intent…

Anyway, these lines have nothing to do with the change I'm submitting, so I shouldn't have touched them at all. Apologies for that!