Joint Magnetometer-IMU Calibration via Maximum A Posteriori Estimation