'Upskirt' photos taken without consent are legal, US court rules