Nonlinear development of cross-flow instabilities in compressible and incompressible boundary layer flows