Magnetically driven isentropic compression to multimegabar pressures using shaped current pulses on the Z accelerator