An Australian mining company will pay a West African government nearly $250m to free its boss and two other staff.