NXP-13550: proper close for old aws lib