Windies avoid follow-on against Sri Lanka as rain dominates