Three-dimensional instabilities in compressible flow over open cavities