Nets hang on to beat the Bucks 97-94