Fixed Setup for Phonegap/Cordova 3.4

Some small modifications to compile properly for Phonegap/Cordova 3.4