Coronal heating by Alfvén wave dissipation in compressible nonuniform media