An immersed-boundary method for compressible viscous flows