Long-wavelength fluctuations and dimensionality crossover in confined liquids