Computing the Euler characteristic of generalized Kummer varieties