Critical magnetic fields of aluminium, gallium and thorium under pressure and the isotope effect of cadmium