Apple wins patent dispute over HTC