Added code for legacy packaged apps in drive.js