Upper semicontinuity of global attractors for damped wave equations