Dynamical screening of the van der Waals interaction between graphene layers