Court says Obama appointments violate constitution