fix for navigation toolbar issue with old matplotlib version