Added support for phonegap build