Non-hydrostatic effects in layered shallow water flows