Generalized wave equation in nonlocal elasticity