Magic hang on to beat Bobcats, 96-89