Kyle Lowry undergoes surgery to repair thumb injury