Differential diffusive instabilities of miscible two-layer stratifications in porous media and Hele-Shaw cells