handle phonegap's addEventListener problem