The IMF and the Sri Lankan government reached a deal for a $1.5 billion bailout to avert a balance of payments crisis.