The effect of compressibility on magnetohydrodynamic instabilities in toroidal tokamak geometry