added phonegap emulation
fix