Calculation of van der Waals forces in systems with nonlocal conductivity