Effects of a resistive wall on magnetohydrodynamic instabilities