New York City developer won’t have to remove floors from residential building in Manhattan, court rules