Gravity and magnetic joint inversion for basement and salt structures with the reversible-jump algorithm