Flavor-nonuniversal dark gauge bosons and the muon g−2