Existence of solutions to a class of elliptic equations with nonstandard growth condition and zero order term