An anelastic approximation arising in astrophysics