Make plugin working in PhoneGap env