On the anelastic approximation for a compressible atmosphere